﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;
using System.Reflection;
using log4net;

namespace AnyOffice.general.email
{
    public partial class delete_read_email : ModulePage
    {

        private static ILog log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);

       
        protected void Page_Load(object sender, EventArgs e)
        {
            int num = (Request.QueryString["box_id"] != null) ? int.Parse(Request.QueryString["box_id"].ToString()) : 0;
            int num2 = (Request.QueryString["page"] != null) ? int.Parse(Request.QueryString["page"].ToString()) : 1;
            EmailDao dao = new EmailDao();
            try
            {
                dao.DeleteRead(base.Conn, base.User.Identity.Name);
            }
            catch (Exception exception)
            {
                if (log.IsErrorEnabled)
                {
                    log.Error("", exception);
                }
            }
            base.CloseConn();
            Response.Redirect("inbox.aspx?box_id=" + num.ToString() + "&page=" + num2.ToString());
        }

    }
}
